<?php
namespace Home\Controller;
use \Think\Controller;

class MemberController extends Controller{

	//加载 登录页面
	public function register(){
		$this->display();
	}


	// 执行注册
	public function doregister(){
		$model = D('Member');

		if (!$data = $model->create()){

			$this->error($model->getError());
		}


		if ($model->add() > 0) {

			$this->success('注册成功', U('Index/index'));
		} else {
			$this->error('注册失败');
		}
	} 





}